﻿namespace ARchGL.Platform
{
    public class HostConsts
    {
        public const string LocalizationSourceName = "Platform";

        public const string ConnectionStringName = "Default";

        public const bool MultiTenancyEnabled = true;

        public const int PaymentCacheDurationInMinutes = 30;
    }

    public class TenantConsts
    {
        public const string LocalizationSourceName = "Platform";

        public const string ConnectionStringName = "Tenant";

        public const bool MultiTenancyEnabled = true;

        public const int PaymentCacheDurationInMinutes = 30;
    }

    public class ValueTypeLength
    {
        /// <summary>
        /// 十进制 Decimal 小数长度18，精度6
        /// </summary>
        public const string Decimal_18_6 = "DECIMAL(18, 6)";

        public static string Decimal(int a, int b)
        {
            return $"DECIMAL({a}, {b})";
        }

        /// <summary>
        /// PSQL JSON 数据类型
        /// </summary>
        public const string Json_100 = "JSON(100)";
    }
}